﻿using Mes.Domain.BoundedContext;

namespace Mes.Application.DTO.Results.MasterData
{
    /// <summary>
    /// 物料出参
    /// </summary>
    public class MaterialResult : IdEntityResult
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 物料类Id
        /// </summary>
        public int MaterialClassId { get; set; }

        /// <summary>
        /// 物料类名称
        /// </summary>
        public string MaterialClassName { get; set; } = string.Empty;

        /// <summary>
        /// 物料类类型Id
        /// </summary>
        public int MaterialClassTypeId { get; set; }

        /// <summary>
        /// 物料类类型名称
        /// </summary>
        public string MaterialClassTypeName { get; set; } = string.Empty;


        /// <summary>
        /// 计量单位Id
        /// </summary>
        public int MeasuringUnitId { get; set; }

        /// <summary>
        /// 计量单位名称
        /// </summary>
        public string MeasuringUnitName { get; set; } = string.Empty;

        /// <summary>
        /// 小数位数
        /// </summary>
        public int PrecisionPlace { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string Specification { get; set; } = string.Empty;

        /// <summary>
        /// 生产单元Id
        /// </summary>
        public int ProdutionUnitId { get; set; }

        /// <summary>
        /// 生产单元名称
        /// </summary>
        public string ProdutionUnitName { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; } = string.Empty;

        /// <summary>
        /// 物料的数量
        /// </summary>
        public double MaterialNumber { get; set; }
    }

    /// <summary>
    /// 查询物料分页列表出参
    /// </summary>
    public class MaterialsResults : MaterialResult
    {
        public IList<IdNameResult> MaterialBOMs { get; set; } = new List<IdNameResult>();
    }

    /// <summary>
    /// 查询单个物料清单出参
    /// </summary>
    public class MaterialResults : MaterialResult
    {
        /// <summary>
        /// 物料清单列表
        /// </summary>
        public IList<MaterialBOMResult> MaterialBOMs { get; set; } = new List<MaterialBOMResult>();
    }
}
